package china.accountinghelper.adapter;

import java.util.List;

import com.xdroid.base.AdapterBase;

import china.wc.tallyhelper.R;
import china.wc.tallyhelper.controls.SlideMenuItem;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class AdapterSlideMenu extends AdapterBase<SlideMenuItem> {
	
	public AdapterSlideMenu(Context pContext,List<SlideMenuItem> pList) {
		super(pContext, pList);
		
	}

  //	返回绑定好菜单Title的View
	@Override
	public View getView(int pPosition, View pConvertView, ViewGroup pParent) {
		
		if (pConvertView == null) {
			pConvertView = this.getLayoutInflater().inflate(R.layout.item_slidemenu, null);
		}
		
		SlideMenuItem _SlideMenuItem = this.getList().get(pPosition);
		
		TextView _TextView = (TextView) pConvertView.findViewById(R.id.ItemSlideMenu_TextView_Title);
		_TextView.setText(_SlideMenuItem.getTitle());
		
		return pConvertView;
	}

}
